package thread;
//Do uu tien cua luong
public class PriorityThread {
    public static void main(String args[]){
        int n=20;
        int nt=12;
        int prio[]={Thread.MAX_PRIORITY,//0
                    Thread.NORM_PRIORITY,//1
                    Thread.MIN_PRIORITY};//2
        for( int i=0; i<nt; i++){
        MyThread t = new MyThread("Thread "+i,n);
                 t.setPriority(prio[i%3]);//Chia lay du, tra ve 0,1,2 tuong ung 3 muc do uu tien cua luong
                                          //Muc do cao nhat (0) thi thuc hien truoc
        }
    }   
}
/*
Domain la anh xa ten va IP public
*/